package com.jjsc.client.api;

import com.jjsc.client.api.domain.UserAddress;
import com.jjsc.client.api.factory.RemoteUserAddressFallbackFactory;
import com.jjsc.common.core.constant.SecurityConstants;
import com.jjsc.common.core.constant.ServiceNameConstants;
import com.jjsc.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @Author: 钟城明
 * @CreateTime: 2025-11-04
 * @Description:
 * @Version: 1.0
 */
@FeignClient(
        contextId = "RemoteUserAddressService",
        value = ServiceNameConstants.CLIENT_SERVICE,
        fallbackFactory = RemoteUserAddressFallbackFactory.class
)
public interface RemoteUserAddressService {
    @GetMapping("/userAddress/getUserAddress/{id}")
    R<UserAddress> getUserAddress(
            @PathVariable("id") Long id,
            @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}